import { Prisma } from '@prisma/client';
import { IsDefined, IsNotEmptyObject } from 'class-validator';
import { BaseDto, BaseFindDto, BaseQueryDto } from './base.dto';

export class SKUCreateDto extends BaseDto<Prisma.SKUCreateInput> {}

export class SKUUpdateDto extends BaseDto<Prisma.SKUUpdateInput> {
  @IsDefined({ message: '条件必填' })
  @IsNotEmptyObject({ nullable: false }, { message: '条件参数必填' })
  where: Prisma.SKUWhereUniqueInput;
}

export class SKUFindDto extends BaseFindDto<
  Prisma.SKUWhereUniqueInput,
  Prisma.SKUSelect
> {}

export class SKUQueryDto extends BaseQueryDto<Prisma.SKUWhereUniqueInput> {}

export class SKUListDto extends BaseQueryDto<Prisma.SKUWhereUniqueInput> {}
